#pragma once

#include <QWidget>
#include "networkmanager.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MedicineQueryWindow; }
QT_END_NAMESPACE

class MedicineQueryWindow : public QWidget
{
    Q_OBJECT

public:
    MedicineQueryWindow(QWidget *parent = nullptr);
    ~MedicineQueryWindow();

private:
    void displayData(const QJsonObject &data);
    void setTableItem(int row, int column, const QString &text);

private slots:
    void on_queryButton_clicked();
    void handleQueryMedicineResponse(const QJsonObject &response);

private:
    Ui::MedicineQueryWindow *medicinequerywindowUi;
    NetworkManager *networkManager;
};
